#!/usr/bin/env python3
# _*_coding:utf-8_*_
# cockroach
# email:donnie.fan@foxmail.com

from code.core import file_processing
from code.conf import settings

path_db = settings.conf()
path_db = path_db.get("path_db")

def home():
    '''
    获取数据库中用户信息，并返回userinfo页面用户信息
    :return:
    '''
    print("in the userinfo.py")
    user_dict = file_processing.r_file(path_db)
    print("-----用户信息-----")
    print("用户: %s" % user_dict['name'])
    print("您的信用额度为: %s" % user_dict['credit'])
    print("您的可用额度为: %s" % user_dict['balance'])
    pass